package face.pay.web.mch.order;

import face.pay.system.annotation.CurrentUser;
import face.pay.common.order.IOrderService;
import face.pay.entity.UserInfo;
import face.pay.util.page.PageData;
import face.pay.util.page.PageParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Map;

@Controller
@RequestMapping("/order")
public class OrderController {

    @Autowired
    public IOrderService iOrderService;

    @RequestMapping("/list")
    public String order(@CurrentUser UserInfo loginUser){
        return "order/list";
    }

    /**
     *
     * @param loginUser
     * @param params(timeStart timeEnd monneyMin moneyMax)
     * @param pageParam
     * @return
     */
    @RequestMapping("queryData")
    @ResponseBody
    public PageData data(@CurrentUser UserInfo loginUser, @RequestParam Map<String, Object> params, PageParam pageParam,
                         String createdTime, String type,String payType,Integer storeId,Integer status){
       return this.iOrderService.queryData(loginUser,params,pageParam,createdTime,type,payType,storeId,status);
    }

}
